<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
  <script type="text/javascript">
 function selectvalue(values)
 {
  window.opener.document.getElementById('values').value=values;
  var browserName=navigator.appName;  
                 if (browserName=="Netscape"){  
                      // alert('chrome');   
                       window.open('', '_parent', '');  
                       window.close();  
                 }  
                 if (browserName=="Microsoft Internet Explorer") {   
                       alert('ie');  
                       window.parent.opener = "whocares";   
                       window.parent.close();   
                 }  
				 
//如果你使用的是firefox浏览器必须要做以下设置 
//1、在地址栏输入about:config然后回车，警告确认 
//2、在过滤器中输入”dom.allow_scripts_to_close_windows“，双击即可将此//值设为true 
 }
  </script>
 </head>
 <body>
 <%
      String a = request.getParameter("id");
 %>
  <select id="selectlist" onchange="selectvalue(this.value)">
 <option value="" selected="selected">请选择值</option>
 <option value="a">a</option>
 <option value="<%=a %>">a</option>
 <option value="值3">值3</option>
 <option value="值4">值4</option>
  </select>
</html>